<template>
  <view class="product">
    <image class="image" :src="product.productMedia.url" />
    <view class="info">
      <view class="title">{{ product.productName }}</view>
      <view class="size">默认</view>
      <view class="price-number">
        <text class="price">￥{{ price }}</text>
        <text class="number">{{ product.productCount }}</text>
      </view>
    </view>
  </view>
</template>
<script lang="ts">
import "./index.less";
import { moneyFormat } from "../../../../../../services/products-service";
export default {
  props: ["product"],
  computed: {
    price(): string {
      return moneyFormat(this.product.productPrice.money);
    }
  }
};
</script>
